{%extends "entrenadores/base.html"%}

{%block extrahead%}
    {% load static %}
    {% get_static_prefix as STATIC_PREFIX %}
    
    <link rel="stylesheet" href="{{ STATIC_PREFIX }}css/jquery/ui/jquery.ui.all.css">

    <link rel="stylesheet" href="{{ STATIC_PREFIX }}css/jquery/ui/jquery.ui.tabs.css" type="text/css"/>
    <link rel="stylesheet" href="{{ STATIC_PREFIX }}css/jquery/ui/jquery.ui.core.css" type="text/css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="{{ STATIC_PREFIX }}css/jquery/ui/jquery-ui-1.8.16.custom.css" />

    <script type="text/javascript" src="{{ STATIC_PREFIX }}js/jquery/jquery-1.7.min.js"></script> 

    <script type="text/javascript" src="{{ STATIC_PREFIX }}js/jquery/ui/jquery.ui.core.js"></script>
    
    <script type="text/javascript" src="{{ STATIC_PREFIX }}js/jquery/ui/jquery.ui.widget.js"></script> 
    <script type="text/javascript" src="{{ STATIC_PREFIX }}js/jquery/ui/jquery.ui.tabs.js"></script> 

    <script> 
        $(function() {
            $("#tabs").tabs();
        });
    </script>

{%endblock%}

{% block breadcrumb %} <a href="/">Inicio</a> > <a href='/entrenadores/'>Entrenadores</a> > Ver entrenador {% endblock %}

{%block content%}
    <form action="" enctype='multipart/form-data'>{% csrf_token %}
        <div class='demo'>
            <div id="tabs"> 
                <ul> 
                    <li><a href="#tabs-1">Perfil</a></li> 
                    <li><a href="#tabs-2">Contacto</a></li> 
                    <li><a href="#tabs-3">Deportes</a></li> 
                </ul> 
                <div id="tabs-1">
                    <table width='100%'> <tr> <td>
                        <div align='left'> <table>
                            <tr><td><p align="right"><label>Activo:</label></p></td>
                            <td><p align="left"><input type="checkbox" disabled {% if entrenador.activo %}checked="yes"{% endif %} ></p></td></tr>
                            
                            <tr><td><p align="right"><label>Nombres:</label></p></td>
                            <td><p align="left"><label>{{entrenador.nombres}}</label></p></td></tr>
                            
                            <tr><td><p align="right"><label>Apellidos:</label></p></td>
                            <td><p align="left"><label>{{entrenador.apellidos}}</label></p></td></tr>
                           
                        </table> </div> </td> 
                        <td> <div align='center'><br>
                            <img src='{{STATIC_PREFIX}}media/{{url_foto}}' alt='Foto perfil' width='150' height='150'/><br><br>
                            <table>
                            {{form.file.errors}}
                            {{form.file}}
                            </table>
                        </div> </td>
                    </tr> </table>
                </div>
                
                <div id="tabs-2">
                    <table>
                        <tr><td><p align="right"><label>Tel&eacute;fono celular:</label></p></td>
                        <td><p align="left"><label>{{entrenador.telefono_celular}}</label></p></td></tr>
                        
                        <tr><td><p align="right"><label>Tel&eacute;fono domicilio:</label></p></td>
                        <td><p align="left"><label>{{entrenador.telefono}}</label></p></td></tr>
                        
                        <tr><td><p align="right"><label>Correo electr&oacute;nico:</label></p></td>
                        <td><p align="left"><label>{{entrenador.correo_electronico}}</label></p></td></tr>
                    </table>
                </div>
                
                <div id="tabs-3">
                    {% if entrenador.deportes.all %}
                        <h3>Entrena los siguientes deportes:</h3>
                        <ul>
                            {% for deporte in entrenador.deportes.all %}
                            <li><a href="/deportes/ver/{{deporte.pk}}">{{deporte.nombre}}</a></li> 
                            {% endfor %}
                        </ul>
                    {% else %}
                        <h3>El entrenador no est&aacute; asignado a ning&uacute;n deporte</h3>
                    {% endif %}
                </div>
                
            </div>
        </div>

    </form>
<div class='buttons' align='right'>
    <input type='submit' class='savebuton'   value='Editar'   onclick="document.location = '../../editar/{{entrenador.pk}}';">
    <input type='submit' class='cancelbuton' value='Regresar' onclick="document.location = '../../';">
</div>
{%endblock%}
